home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
USGS: Oil & Gas Fields of South Asia
/
USGS Oil & Gas Fields of South Asia.iso
/
pc
/
ACROREAD
/
UNIX
/
ARSGITAR.Z
/
ARSGITAR
/
IRIXR.install
/
IRIXR.TAR
/
Browsers
/
netscape
Wrap
Text File
|
1997-06-13
|
5KB
|
200 lines
#!/bin/sh
#
# Copyright (c) 1996, Adobe Systems Incorporated
# All Rights Reserved
#
# This is an example script to show you how to launch Netscape (TM) with
# Acrobat 3.0 integration. If the script is run unmodified, it will
# query the user for: 1). the installation directory for Acrobat 3.0 and
# 2). the installation directory for Netscape v3.0. You may modify the
# script where indicated to identify the proper directories.
#
#
# Initialization
#
osname=`uname -s`
osrelease=`uname -r`
args="$@"
echoawk ()
{
echo $* | awk '{ printf "%s", $0 }'
}
echon ()
{
echo -n "$*"
}
echoc ()
{
echo "${*}\c"
}
if [ `echo "x\c"` = "x" ] ; then
echonl=echoc
else
echonl=echon
fi
ndefault="/usr/local/Netscape3"
adefault="/usr/local/Acrobat3"
case "$osname" in
SunOS)
case "$osrelease" in
4.1.[34]*)
adefault="/usr/Acrobat3"
;;
5.*)
adefault="/opt/Acrobat3"
;;
esac
;;
IRIX)
adefault="/opt/Acrobat3"
;;
HP-UX)
case "$osrelease" in
*.09.*)
adefault="/usr/local/Acrobat3"
;;
*.10.*)
adefault="/opt/Acrobat3"
;;
esac
;;
Linux)
adefault="/usr/local/Acrobat3"
;;
esac
#
# The Shell variable "adir" identifies the Acrobat 3.0 installation
# directory. If the value of "$adir" is zero length, the user will
# be prompted to enter the installation directory for Acrobat 3.0
# The correct directory for Acrobat may be added after the equals
# sign on the line below.
#
adir=
#
# The Shell variable "ndir" identifies the Netscape 3.0 installation
# directory. If the value of "$ndir" is zero length, the user will
# be prompted to enter the installation directory for Netscape 3.0.
# The correct directory for Netscape may be added after the equals
# sign on the line below.
#
ndir=
#
# The following lines are fairly generic and should not require
# any modification. They just test to see if the Acrobat installation
# directory is somewhat valid.
#
while [ -z "$adir" ] ; do
$echonl "Enter the directory containing Acrobat 3.0 [$adefault] "
read answer
if [ -z "$answer" ] ; then
adir="$adefault"
else
adir="$answer"
fi
done
if [ ! -d "$adir" ] ; then
echo " "
echo "The installation directory:"
echo " "
echo "$adir"
echo " "
echo "is not a valid Acrobat 3.0 installation. You will not"
echo "be able to view embedded PDF's and view PDF's in Netscape."
echo "Please consult a system administrator at your site to get the"
echo "pathname to the Acrobat 3.0 installation."
echo " "
fi
while [ -z "$ndir" ] ; do
$echonl "Enter the directory containing Netscape 3.0 [$ndefault] "
read answer
if [ -z "$answer" ] ; then
ndir="$ndefault"
else
ndir="$answer"
fi
done
case "$osname" in
SunOS)
case "$osrelease" in
4.1.[34]*)
pconfig=sparcsun
XNLSPATH="$ndir"/nls
export XNLSPATH
;;
5.3*) pconfig=sparcsolaris ;;
5.[45]*) pconfig=sparcsolaris ;;
esac
;;
HP-UX) pconfig=hppahpux ;;
IRIX)
pconfig=mipsirix
;;
Linux)
pconfig=intellinux
;;
esac
#
# Point Netscape to its Keysym Database. This is recommended practice.
#
XKEYSYMDB="$ndir"/XKeysymDB
export XKEYSYMDB
#
# This points Netscape to the Acrobat viewer plug-in so that PDF's
# may be viewed inside of the Netscape window.
#
NPX_PLUGIN_PATH="$adir"/Browsers/$pconfig
export NPX_PLUGIN_PATH
#
# We must make sure that the Acrobat Reader and/or Exchange are on
# the execution search path. The Acrobat plug-in for Netscape tries
# to execute the correct version of Acrobat.
#
PATH="$adir"/bin:$PATH
export PATH
#
# Netscape needs to have its current resources so let's set them here.
#
XENVIRONMENT="$ndir"/Netscape.ad
export XENVIRONMENT
#
# Now to launch Netscape. We take a look to see if the directory exists
# and if the file called "netscape" inside of the directory is executable.
# If neither condition is true, then we blurt out a short error message.
#
if [ -d "$ndir" ] ; then
if [ -x "$ndir"/netscape ] ; then
exec "$ndir"/netscape ${netscape_args} $args
else
echo " "
echo "$ndir/netscape either does not exist or is not executable."
echo "Please consult a system administrator for the correct path"
echo "to the Netscape browser installation."
echo " "
fi
else
echo " "
echo "$ndir either does not exist or is not a directory."
echo "Please consult a system administrator for the corret path"
echo "to the Netscape browser installation."
echo " "
fi
exit 1